package org.javaboy.vhr.mapper;

import org.apache.ibatis.annotations.Param;
import org.javaboy.vhr.model.Employee;

import java.util.Date;
import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Employee record);

    int insertSelective(Employee record);

    Employee selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Employee record);

    int updateByPrimaryKey(Employee record);

    int getEmployeeByDeptId(Integer id);

    List<Employee> getEmployeeByPage(@Param("start") long start, @Param("size") Integer size, @Param("emp") Employee employee, @Param("beginWorkDate") Date[] beginWorkDate);

    Long getEmployeeTotal(@Param("emp") Employee employee, @Param("beginWorkDate") Date[] beginWorkDate);

    int getMaxWorkId();

    Employee getEmployeeById(Integer id);

    List<Employee> getEmployeeAndSalary(@Param("start") Integer start, @Param("size") Integer size);

    int updateEmployeeSalary(@Param("empId")Integer empId, @Param("salaryId")Integer salaryId);
}